﻿<Application x:Class="CustomDatePicker.App" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:CustomDatePicker" mc:Ignorable="d"
             xmlns:converter="using:CustomDatePicker.Converter">
  <Application.Resources>
    <vm:ViewModelLocator x:Key="Locator" xmlns:vm="using:CustomDatePicker.ViewModel" />
      <converter:DateTimeToFormatConverter x:Key="DateTimeToFormat"></converter:DateTimeToFormatConverter>
    <Style x:Key="ButtonDateTime" TargetType="Button">
    	<Setter Property="Background" Value="{ThemeResource ButtonBackgroundThemeBrush}"/>
    	<Setter Property="Foreground" Value="{ThemeResource ButtonForegroundThemeBrush}"/>
    	<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderThemeBrush}"/>
    	<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}"/>
    	<Setter Property="Padding" Value="12,4,12,4"/>
    	<Setter Property="HorizontalAlignment" Value="Left"/>
    	<Setter Property="VerticalAlignment" Value="Center"/>
    	<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
    	<Setter Property="FontWeight" Value="SemiBold"/>
    	<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="Button">
    				<Grid>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="PointerOver">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPointerOverBackgroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Pressed">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonPressedBackgroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ColorAnimation Duration="0" To="#FFB8B8B8" Storyboard.TargetProperty="(ContentPresenter.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill)" Storyboard.TargetName="path">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarItemPointerOverBackgroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledBackgroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonDisabledBorderThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    									<ColorAnimation Duration="0" To="#FF777777" Storyboard.TargetProperty="(ContentPresenter.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
    									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill)" Storyboard.TargetName="path">
    										<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarItemDisabledForegroundThemeBrush}"/>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="FocusStates">
    							<VisualState x:Name="Focused">
    								<Storyboard>
    									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
    									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Unfocused"/>
    							<VisualState x:Name="PointerFocused"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}"
						 BorderThickness="{TemplateBinding BorderThickness}"
						  Background="{TemplateBinding Background}" Margin="3">
						  <Grid MinHeight="40">
						  	<Grid.ColumnDefinitions>
						  		<ColumnDefinition/>
						  		<ColumnDefinition Width="40"/>
						  	</Grid.ColumnDefinitions>
						  	<ContentPresenter x:Name="ContentPresenter" AutomationProperties.AccessibilityView="Raw" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Content="{TemplateBinding Content}"/>
						  	<Grid Grid.Column="1" Background="{TemplateBinding Background}">
						  		<Path x:Name="path" Data="M45.405,50.241 L45.405,57.871 L53.035,57.871 L53.035,50.241 z M33.656,50.241 L33.656,57.871 L41.287,57.871 L41.287,50.241 z M21.908,50.241 L21.908,57.871 L29.538,57.871 L29.538,50.241 z M10.158,50.241 L10.158,57.871 L17.789,57.871 L17.789,50.241 z M45.405,38.734 L45.405,46.366 L53.035,46.366 L53.035,38.734 z M33.656,38.734 L33.656,46.366 L41.287,46.366 L41.287,38.734 z M21.908,38.734 L21.908,46.366 L29.538,46.366 L29.538,38.734 z M10.158,38.734 L10.158,46.366 L17.789,46.366 L17.789,38.734 z M45.405,27.228 L45.405,34.859 L53.035,34.859 L53.035,27.228 z M33.656,27.228 L33.656,34.859 L41.287,34.859 L41.287,27.228 z M21.908,27.228 L21.908,34.859 L29.538,34.859 L29.538,27.228 z M10.158,27.228 L10.158,34.859 L17.789,34.859 L17.789,27.228 z M0,21.431 L63.414,21.431 L63.414,58.7159 C63.414,61.6352 61.0481,64.001 58.1287,64.001 L5.28514,64.001 C2.36608,64.001 1E-06,61.6352 0,58.7159 z M5.28514,3.816 L10.569,3.816 L10.569,14.0922 L24.6614,14.0922 L24.6614,3.816 L38.7525,3.816 L38.7525,14.0922 L52.8449,14.0922 L52.8449,3.816 L58.1287,3.816 C61.0481,3.816 63.414,6.18199 63.414,9.1012 L63.414,17.613 L0,17.613 L0,9.1012 C1E-06,6.18199 2.36608,3.816 5.28514,3.816 z M45.9454,0 C47.8103,0 49.322,1.51305 49.322,3.37766 L49.322,10.569 L42.569,10.569 L42.569,3.37766 C42.569,1.51305 44.0809,0 45.9454,0 z M17.8615,0 C19.7263,0 21.238,1.51305 21.238,3.37766 L21.238,10.569 L14.484,10.569 L14.484,3.37766 C14.484,1.51305 15.9957,0 17.8615,0 z" HorizontalAlignment="Center" Height="20" Margin="0" Stretch="Fill" StrokeEndLineCap="Square" UseLayoutRounding="False" VerticalAlignment="Center" Width="20" Fill="{ThemeResource AppBarItemForegroundThemeBrush}"/>
						  	</Grid>
						  </Grid>
						  </Border>
    					<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
    					<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
  </Application.Resources>
</Application>